<%@ page language="java"  pageEncoding="UTF-8"%>
<%@include file="/common/jsp/cssAndScript.jsp"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@include file="/pages/head.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>鼎烜电力集团网络办公平台</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script src="${pageContext.request.contextPath}/common/js/My97DatePicker/WdatePicker.js"></script>
	</head>
	<body style="overflow:hidden;">		
		<div id="main_container">
		 <div id="container_border">
        		<div class="content_title">
					<h3 class="basedate_econTargetList_titleIcon">
						日志管理
					</h3>
				</div>
				<div class="form_primary">
					<table border="0" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>
								日志天数<input class="smallinput" id="logDay" name="logDay" value="<s:property value='logDay'/>" /><font color="red">【默认进入查询当天日志】</font>
							</td>
							<td style="width:40%;">
							    <a class="btn_grid_box btn_file_icon2" href="javascript:void(0);" style="height:28px" onclick="showDialog('鼎烜电力集团网络办公平台','initAddLog','700','500');">新建工作日志</a>
							    <a class="btn_grid_box btn_file_icon2" href="javascript:void(0);">查看
			            			<s:select id="users" list="users" onchange="changeUser(this.value)" name="user.id" value="userId" headerKey="" headerValue="请选择" listKey="id" listValue="cname" theme="simple"/>
			            			员工日志
			            		</a>
			            		<a class="btn_grid_box btn_search_file" style="height:28px;margin-left:4px;" href="javascript:void(0);" onclick="searchPersonLogBySearchKey();return false;">查询</a>
							</td>
						</tr>
					</table>
				</div>
				<p class="modle_hr"></p>
				<div class="window_1">
					<div id="_econTargetList_div_id">
						<%@include file="_log.jsp"%>
					</div>
				</div>
			</div>
		</div>
	</body>
<script type="text/javascript">
	function changeUser(userId){
		var logDay = document.getElementById("logDay").value;
		if(isNumber(logDay)){
			var url = "<%=basePath %>person/getPersonLogByUidAndDate.action?userId="+userId+"&logDay="+logDay;
			location.href=url;
		}else{
			alert('查询参数不合法！！');
		}
	}
	function isNumber(oNum){   
	  if(!oNum)return false;   
	  var strP=/^\d+(\.\d+)?$/;   
	  if(!strP.test(oNum)) return false;   
	  try{   
	  	if(parseFloat(oNum)!=oNum){
	  		return false;
		}   
	  }catch(ex){   
	   		return false;   
	  }   
	  return true;   
	}  
</script>
</html>
